package pikes.ecma;

public class DoWhileStatement extends PrintableSourceElement implements Statement {

	private IExpression expression = null;

	private Statement statement = null;

	public DoWhileStatement(final IExpression expression, final Statement statement) {
		this.expression = expression;
		this.statement = statement;
	}

	public void visit(final SyntaxTreeVisitor syntaxTreeVisitor) throws EcmaSyntaxVisitingException {
		syntaxTreeVisitor.Do();
		statement.visit(syntaxTreeVisitor);
		syntaxTreeVisitor.While();
		syntaxTreeVisitor.beforeParameterList();
		expression.visit(syntaxTreeVisitor);
		syntaxTreeVisitor.afterParameterList();
	}

}
